package edu.kjxy.day02.t20;

/**
 * 功能:优先级具有随机性
 * 优先级高低并不是绝对的先执行，线程的优先级和打印顺序无关
 * 作者:程序员欧阳子韩
 * 日期:2024/2/1 16:00
 */
public class RunTest {
    public static void main(String[] args) {
        for (int i = 0; i < 5; i++) {
            MyThread1 thread1 = new MyThread1();
            thread1.setPriority(5);
            thread1.start();
            MyThread2 thread2 = new MyThread2();
            thread2.setPriority(6);
            thread2.start();
        }
    }
}
